package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.dto.integration.component.AccountCapitalSourceDto;
import com.sg.dto.integration.component.QueryOutputParametersDetailComReqDto;
import com.sg.dto.integration.component.QueryOutputParametersDetailComRespDto;
import com.sg.dto.integration.framework.BatchQueryInductionRecordListComReqDto;
import com.sg.dto.integration.framework.BatchQueryInductionRecordListComRespDto;
import com.sg.dto.integration.framework.PerOrgInductionRecordDto;
import com.sg.service.biz.bff.FinanceService;
import com.wicket.okrapp.integration.EvaThemeService;
import com.wicket.okrapp.integration.FinanceService;
import com.wicket.okrapp.integration.dto.*;
import com.sg.common.exception.Assert;
import com.wicket.okrcomponent.integration.DivineDataService;
import com.wicket.okrfinance.integration.FinanceService;
import com.wicket.okrfinance.integration.dto.*;
import com.wicket.okrframework.integration.InductionRecordService;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;
//import com.wicket.okrfinance.integration.dto.AddAccountSubjectRespDto;
//import com.wicket.okrfinance.integration.dto.AddAccountSubjectReqDto;
//import com.wicket.okrfinance.integration.dto.QueryAccountSubjectListRespDto;
//import com.wicket.okrfinance.integration.dto.QueryAccountSubjectListReqDto;
//import com.wicket.okrfinance.integration.dto.QueryAccountSubjectDetailRespDto;
//import com.wicket.okrfinance.integration.dto.QueryAccountSubjectDetailReqDto;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class FinanceServiceImpl implements FinanceService {

    @Resource
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.finance.FinanceService fwFinanceFinanceClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    com.sg.service.biz.app.FinanceService fwAppFinanceClient;
    @Resource
    com.sg.service.biz.component.DivineDataService fwCompDivineDataClient;
    @Resource
    com.sg.service.biz.app.EvaThemeService fwAppEvaThemeClient;

    /**
     * B7查规划使用预算资金来源列表(边界)[7682]
     * gen by moon at 11/7/2023, 7:47:09 PM
     */
    @Trace(operationName = "B7查规划使用预算资金来源列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryPlanUseBudgetAccountCapitalSourceListBorderRespDto queryPlanUseBudgetAccountCapitalSourceListBorder(BffQueryPlanUseBudgetAccountCapitalSourceListBorderReqDto reqDto) {


        QueryPlanUseBudgetAccountCapitalSourceListRespDto queryPlanUseBudgetAccountCapitalSourceListRespDto_1 = null;
//步骤0: D7查规划使用预算资金来源列表 - queryPlanUseBudgetAccountCapitalSourceList
        QueryPlanUseBudgetAccountCapitalSourceListRespDto queryPlanUseBudgetAccountCapitalSourceListRespDto = null;
        QueryPlanUseBudgetAccountCapitalSourceListReqDto queryPlanUseBudgetAccountCapitalSourceListReqDto = new QueryPlanUseBudgetAccountCapitalSourceListReqDto();
        if (reqDto != null) {
            queryPlanUseBudgetAccountCapitalSourceListReqDto.setAccountCapitalSourceList(reqDto.getPlanUseBudgetAccountCapitalSourceList());//list-field-assign//sourceId:1236268_1
        }

        /*D7查规划使用预算资金来源列表[7683]   */

        queryPlanUseBudgetAccountCapitalSourceListRespDto = fwFinanceFinanceClient.queryPlanUseBudgetAccountCapitalSourceList(queryPlanUseBudgetAccountCapitalSourceListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryPlanUseBudgetAccountCapitalSourceListRespDto_1 = queryPlanUseBudgetAccountCapitalSourceListRespDto;

        BffQueryPlanUseBudgetAccountCapitalSourceListBorderRespDto retData = new BffQueryPlanUseBudgetAccountCapitalSourceListBorderRespDto();
        if (queryPlanUseBudgetAccountCapitalSourceListRespDto_1 != null) {
            retData.setPlanUseBudgetAccountCapitalSourceList(queryPlanUseBudgetAccountCapitalSourceListRespDto_1.getPlanUseBudgetAccountCapitalSourceList().stream().map(item -> BeanUtil.toBean(item, BffPlanUseBudgetAccountCapitalSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1236270_1
        }


        return retData;
    }

    /**
     * B7查财务资金来源列表(边界)[7669]
     * gen by moon at 11/7/2023, 7:47:08 PM
     */
    @Trace(operationName = "B7查财务资金来源列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAccountCapitalSourceListBorderRespDto queryAccountCapitalSourceListBorder(BffQueryAccountCapitalSourceListBorderReqDto reqDto) {


        QueryAccountCapitalSourceListRespDto queryAccountCapitalSourceListRespDto_1 = null;
//步骤0: D7查财务资金来源列表 - queryAccountCapitalSourceList
        QueryAccountCapitalSourceListRespDto queryAccountCapitalSourceListRespDto = null;
        QueryAccountCapitalSourceListReqDto queryAccountCapitalSourceListReqDto = new QueryAccountCapitalSourceListReqDto();
        queryAccountCapitalSourceListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1231961_1
        if (reqDto != null) {
            queryAccountCapitalSourceListReqDto.setUseSceneTypeCode(reqDto.getUseSceneTypeCode());//SimpleFieldAssign//sourceId:1231960_1
        }

        /*D7查财务资金来源列表[7670]   */
        Assert.isNull(queryAccountCapitalSourceListReqDto.getSubjectLifeCycle(), "B7查财务资金来源列表(边界)-D7查财务资金来源列表-主体生命周期不能为空", false);
        queryAccountCapitalSourceListRespDto = fwFinanceFinanceClient.queryAccountCapitalSourceList(queryAccountCapitalSourceListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryAccountCapitalSourceListRespDto_1 = queryAccountCapitalSourceListRespDto;

        BffQueryAccountCapitalSourceListBorderRespDto retData = new BffQueryAccountCapitalSourceListBorderRespDto();
        if (queryAccountCapitalSourceListRespDto_1 != null) {
            retData.setAccountCapitalSourceList(queryAccountCapitalSourceListRespDto_1.getAccountCapitalSourceList().stream().map(item -> BeanUtil.toBean(item, BffAccountCapitalSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1231964_1
        }


        return retData;
    }

    /**
     * B7新增财务科目(管理)[8006]
     * gen by moon at 2/24/2024, 12:33:00 AM
     */
    @Trace(operationName = "B7新增财务科目(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddAccountSubjectRespDto addAccountSubject(BffAddAccountSubjectReqDto reqDto) {


        AddAccountSubjectRespDto addAccountSubjectRespDto_1 = null;
//步骤0: D7新增财务科目 - addAccountSubject
        AddAccountSubjectRespDto addAccountSubjectRespDto = null;
        AddAccountSubjectReqDto addAccountSubjectReqDto = new AddAccountSubjectReqDto();
        if (reqDto != null) {
            addAccountSubjectReqDto.setAccountSubjectName(reqDto.getAccountSubjectName());//SimpleFieldAssign//sourceId:1349953_1
            addAccountSubjectReqDto.setAccountSubjectType(reqDto.getAccountSubjectType());//SimpleFieldAssign//sourceId:1349954_1
            addAccountSubjectReqDto.setBillTypeCode(reqDto.getBillTypeCode());//SimpleFieldAssign//sourceId:1349951_1
            addAccountSubjectReqDto.setAccountSubjectClassCode(reqDto.getAccountSubjectClassCode());//SimpleFieldAssign//sourceId:1349955_1
            addAccountSubjectReqDto.setBehaviorTypeCode(reqDto.getBehaviorTypeCode());//SimpleFieldAssign//sourceId:1349956_1
            addAccountSubjectReqDto.setIsOrgOfficialAccountNom(reqDto.getIsOrgOfficialAccountNom());//SimpleFieldAssign//sourceId:1349959_1
            addAccountSubjectReqDto.setIsFundsIndex(reqDto.getIsFundsIndex());//SimpleFieldAssign//sourceId:1349957_1
            addAccountSubjectReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1349958_1
        }

        /*D7新增财务科目[8003]   */
        Assert.isNull(addAccountSubjectReqDto.getAccountSubjectName(), "B7新增财务科目(管理)-D7新增财务科目-科目名称不能为空", false);
        Assert.isNull(addAccountSubjectReqDto.getBillTypeCode(), "B7新增财务科目(管理)-D7新增财务科目-收支类型不能为空", false);
        Assert.isNull(addAccountSubjectReqDto.getIsOrgOfficialAccountNom(), "B7新增财务科目(管理)-D7新增财务科目-是否组织正式财务标准不能为空", false);
        Assert.isNull(addAccountSubjectReqDto.getIsFundsIndex(), "B7新增财务科目(管理)-D7新增财务科目-是否资金指标不能为空", false);
        Assert.isNull(addAccountSubjectReqDto.getSubjectLifeCycle(), "B7新增财务科目(管理)-D7新增财务科目-主体生命周期不能为空", false);
        addAccountSubjectRespDto = fwFinanceFinanceClient.addAccountSubject(addAccountSubjectReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addAccountSubjectRespDto_1 = addAccountSubjectRespDto;

        BffAddAccountSubjectRespDto retData = new BffAddAccountSubjectRespDto();
        if (addAccountSubjectRespDto_1 != null) {
            retData.setAccountSubjectld(addAccountSubjectRespDto_1.getAccountSubjectld());//SimpleFieldAssign//sourceId:1349970_1
        }


        return retData;
    }

    /**
     * B7查财务科目列表(管理)[8010]
     * gen by moon at 11/26/2023, 6:32:18 PM
     */
    @Trace(operationName = "B7查财务科目列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAccountSubjectListRespDto queryAccountSubjectList(BffQueryAccountSubjectListReqDto reqDto) {


        QueryAccountSubjectListRespDto queryAccountSubjectListRespDto_1 = null;
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D7查财务科目列表 - queryAccountSubjectList
        QueryAccountSubjectListRespDto queryAccountSubjectListRespDto = null;
        QueryAccountSubjectListReqDto queryAccountSubjectListReqDto = new QueryAccountSubjectListReqDto();
        if (reqDto != null) {
            queryAccountSubjectListReqDto.setAccountSubjectName(reqDto.getAccountSubjectName());//SimpleFieldAssign//sourceId:1350024_1
            queryAccountSubjectListReqDto.setAccountSubjectType(reqDto.getAccountSubjectType());//SimpleFieldAssign//sourceId:1350023_1
            queryAccountSubjectListReqDto.setIncomeExpensesType(reqDto.getIncomeExpensesType());//SimpleFieldAssign//sourceId:1350025_1
            queryAccountSubjectListReqDto.setAccountSubjectClassCode(reqDto.getAccountSubjectClassCode());//SimpleFieldAssign//sourceId:1350026_1
            queryAccountSubjectListReqDto.setIsOrgOfficialAccountNom(reqDto.getIsOrgOfficialAccountNom());//SimpleFieldAssign//sourceId:1350027_1
            queryAccountSubjectListReqDto.setIsFundsIndex(reqDto.getIsFundsIndex());//SimpleFieldAssign//sourceId:1350028_1
            queryAccountSubjectListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:1350029_1
        }

        /*D7查财务科目列表[8011]   */

        queryAccountSubjectListRespDto = fwFinanceFinanceClient.queryAccountSubjectList(queryAccountSubjectListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryAccountSubjectListRespDto_1 = queryAccountSubjectListRespDto;

//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
        if (queryAccountSubjectListRespDto != null) {
            BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto = new BatchQueryInductionRecordListComReqDto();
            if (queryAccountSubjectListRespDto != null && queryAccountSubjectListRespDto.getAccountSubjectList() != null && !CollectionUtil.isEmpty(queryAccountSubjectListRespDto.getAccountSubjectList())) {
                batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryAccountSubjectListRespDto.getAccountSubjectList().stream().map(item -> item.getOperationInductionId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1350039_1
            }

            /*D1-3批量查询就职记录列表（公共）[602]   */

            batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
        }

        BffQueryAccountSubjectListRespDto retData = new BffQueryAccountSubjectListRespDto();
        //数据集融合  MoreListToOneSource
        if (queryAccountSubjectListRespDto_1 != null && !CollectionUtil.isEmpty(queryAccountSubjectListRespDto_1.getAccountSubjectList())) {
            for (AccountSubjectDto accountSubjectDto : queryAccountSubjectListRespDto_1.getAccountSubjectList()) {
                BffAccountSubjectDto retElm = new BffAccountSubjectDto();
                if (queryAccountSubjectListRespDto_1 != null) {
                    retElm.setAccountSubjectld(accountSubjectDto.getAccountSubjectld());//SimpleFieldAssign//sourceId:274293_2
                    retElm.setAccountSubjectCode(accountSubjectDto.getAccountSubjectCode());//SimpleFieldAssign//sourceId:274294_2
                    retElm.setAccountSubjectName(accountSubjectDto.getAccountSubjectName());//SimpleFieldAssign//sourceId:274295_2
                    retElm.setAccountSubjectType(accountSubjectDto.getAccountSubjectType());//SimpleFieldAssign//sourceId:274296_2
                    retElm.setIncomeExpensesType(accountSubjectDto.getIncomeExpensesType());//SimpleFieldAssign//sourceId:274297_2
                    retElm.setSubjectLifeCycle(accountSubjectDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:274298_2
                    retElm.setOperationInductionId(accountSubjectDto.getOperationInductionId());//SimpleFieldAssign//sourceId:274299_2
                    retElm.setOperateTime(accountSubjectDto.getOperateTime());//SimpleFieldAssign//sourceId:274300_2
                }
                retData.getAccountSubjectList().add(retElm);
                if (batchQueryInductionRecordListComRespDto_1 != null) {
                    for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                        if (perOrgInductionRecordDto.getInductionRecordId().equals(accountSubjectDto.getOperationInductionId())) {
                            if (batchQueryInductionRecordListComRespDto_1 != null) {
                                retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//SimpleFieldAssign//sourceId:274312_2
                                retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//SimpleFieldAssign//sourceId:274313_2
                                retElm.setNickName(perOrgInductionRecordDto.getNickName());//SimpleFieldAssign//sourceId:274314_2
                            }
                        }
                    }
                }

            }
        }//sourceId:1350038_1


        return retData;
    }

    /**
     * B7查询财务科目详情(管理)[8016]
     * gen by moon at 11/26/2023, 6:32:20 PM
     */
    @Trace(operationName = "B7查询财务科目详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryAccountSubjectDetailRespDto queryAccountSubjectDetail(BffQueryAccountSubjectDetailReqDto reqDto) {


        QueryAccountSubjectDetailRespDto queryAccountSubjectDetailRespDto_1 = null;
//步骤0: D7查询财务科目详情 - queryAccountSubjectDetail
        QueryAccountSubjectDetailRespDto queryAccountSubjectDetailRespDto = null;
        QueryAccountSubjectDetailReqDto queryAccountSubjectDetailReqDto = new QueryAccountSubjectDetailReqDto();
        if (reqDto != null) {
            queryAccountSubjectDetailReqDto.setAccountSubjectld(reqDto.getAccountSubjectld());//SimpleFieldAssign//sourceId:1350308_1
        }

        /*D7查询财务科目详情[8017]   */
        Assert.isNull(queryAccountSubjectDetailReqDto.getAccountSubjectld(), "B7查询财务科目详情(管理)-D7查询财务科目详情-科目ID不能为空", false);
        queryAccountSubjectDetailRespDto = fwFinanceFinanceClient.queryAccountSubjectDetail(queryAccountSubjectDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryAccountSubjectDetailRespDto_1 = queryAccountSubjectDetailRespDto;

        BffQueryAccountSubjectDetailRespDto retData = new BffQueryAccountSubjectDetailRespDto();
        if (queryAccountSubjectDetailRespDto_1 != null) {
            retData.setAccountSubjectld(queryAccountSubjectDetailRespDto_1.getAccountSubjectld());//SimpleFieldAssign//sourceId:1350327_1
            retData.setAccountSubjectCode(queryAccountSubjectDetailRespDto_1.getAccountSubjectCode());//SimpleFieldAssign//sourceId:1350328_1
            retData.setAccountSubjectName(queryAccountSubjectDetailRespDto_1.getAccountSubjectName());//SimpleFieldAssign//sourceId:1350329_1
            retData.setAccountSubjectType(queryAccountSubjectDetailRespDto_1.getAccountSubjectType());//SimpleFieldAssign//sourceId:1350330_1
            retData.setIncomeExpensesType(queryAccountSubjectDetailRespDto_1.getIncomeExpensesType());//SimpleFieldAssign//sourceId:1350331_1
            retData.setAccountSubjectClassCode(queryAccountSubjectDetailRespDto_1.getAccountSubjectClassCode());//SimpleFieldAssign//sourceId:1350332_1
            retData.setBehaviorTypeCode(queryAccountSubjectDetailRespDto_1.getBehaviorTypeCode());//SimpleFieldAssign//sourceId:1350333_1
            retData.setIsFundsIndex(queryAccountSubjectDetailRespDto_1.getIsFundsIndex());//SimpleFieldAssign//sourceId:1350334_1
            retData.setIsOrgOfficialAccountNom(queryAccountSubjectDetailRespDto_1.getIsOrgOfficialAccountNom());//SimpleFieldAssign//sourceId:1350335_1
            retData.setSubjectLifeCycle(queryAccountSubjectDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1350336_1
            retData.setOperationInductionId(queryAccountSubjectDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:1350337_1
            retData.setOriginalRoleMemberId(queryAccountSubjectDetailRespDto_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1350338_1
            retData.setUserId(queryAccountSubjectDetailRespDto_1.getUserId());//SimpleFieldAssign//sourceId:1350339_1
            retData.setUserFace(queryAccountSubjectDetailRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:1350340_1
            retData.setIdCardName(queryAccountSubjectDetailRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:1350341_1
            retData.setNickName(queryAccountSubjectDetailRespDto_1.getNickName());//SimpleFieldAssign//sourceId:1350342_1
            retData.setOperateTime(queryAccountSubjectDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:1350343_1
        }


        return retData;
    }

    /**
     * B7新增财务资金来源(管理)[8042]
     * gen by moon at 2/24/2024, 12:33:04 AM
     */
    @Trace(operationName = "B7新增财务资金来源(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddAccountCapitalSourceRespDto addAccountCapitalSource(BffAddAccountCapitalSourceReqDto reqDto) {


        AddAccountCapitalSourceRespDto addAccountCapitalSourceRespDto_1 = null;
//步骤0: D7新增财务资金来源 - addAccountCapitalSource
        AddAccountCapitalSourceRespDto addAccountCapitalSourceRespDto = null;
        AddAccountCapitalSourceReqDto addAccountCapitalSourceReqDto = new AddAccountCapitalSourceReqDto();
        if (reqDto != null) {
            addAccountCapitalSourceReqDto.setCapitalSourceName(reqDto.getCapitalSourceName());//SimpleFieldAssign//sourceId:1363509_1
            addAccountCapitalSourceReqDto.setCapitalSourceLogo(reqDto.getCapitalSourceLogo());//SimpleFieldAssign//sourceId:1363744_1
            addAccountCapitalSourceReqDto.setUseSceneTypeCode(reqDto.getUseSceneTypeCode());//SimpleFieldAssign//sourceId:1363511_1
            addAccountCapitalSourceReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1363512_1
        }

        /*D7新增财务资金来源[8043]   */
        Assert.isNull(addAccountCapitalSourceReqDto.getCapitalSourceName(), "B7新增财务资金来源(管理)-D7新增财务资金来源-资金来源名称不能为空", false);
        Assert.isNull(addAccountCapitalSourceReqDto.getUseSceneTypeCode(), "B7新增财务资金来源(管理)-D7新增财务资金来源-使用场景类型编码不能为空", false);
        Assert.isNull(addAccountCapitalSourceReqDto.getSubjectLifeCycle(), "B7新增财务资金来源(管理)-D7新增财务资金来源-主体生命周期不能为空", false);
        addAccountCapitalSourceRespDto = fwFinanceFinanceClient.addAccountCapitalSource(addAccountCapitalSourceReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addAccountCapitalSourceRespDto_1 = addAccountCapitalSourceRespDto;

        BffAddAccountCapitalSourceRespDto retData = new BffAddAccountCapitalSourceRespDto();
        if (addAccountCapitalSourceRespDto_1 != null) {
            retData.setCapitalSourceId(addAccountCapitalSourceRespDto_1.getCapitalSourceId());//SimpleFieldAssign//sourceId:1363519_1
        }


        return retData;
    }

    /**
     * B3执行目标预算设置[8432]
     * gen by moon at 2/4/2024, 2:06:25 AM
     */
    @Trace(operationName = "B3执行目标预算设置")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementTargetBudgetSetRespDto implementTargetBudgetSet(BffImplementTargetBudgetSetReqDto reqDto) {


        //步骤0: D3-执行目标预算设置(公共) - implementTargetBudgetSetCom
        ImplementTargetBudgetSetComRespDto implementTargetBudgetSetComRespDto = null;
        ImplementTargetBudgetSetComReqDto implementTargetBudgetSetComReqDto = new ImplementTargetBudgetSetComReqDto();
        if (reqDto != null && reqDto.getTargetBudgetSetList() != null && !CollectionUtil.isEmpty(reqDto.getTargetBudgetSetList())) {
            implementTargetBudgetSetComReqDto.setTargetBudgetSetList(reqDto.getTargetBudgetSetList().stream().map(item -> BeanUtil.toBean(item, TargetBudgetSetDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1524443_1
        }
        if (reqDto != null) {
            implementTargetBudgetSetComReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1524444_1
            implementTargetBudgetSetComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1524445_1
            implementTargetBudgetSetComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1524446_1
            implementTargetBudgetSetComReqDto.setPeriodicModeTypeCode(reqDto.getPeriodicModeTypeCode());//SimpleFieldAssign//sourceId:1524447_1
            implementTargetBudgetSetComReqDto.setAddOrSubOptType(reqDto.getAddOrSubOptType());//SimpleFieldAssign//sourceId:1524448_1
        }

        /*D3-执行目标预算设置(公共)[8385]   */
        Assert.isNull(implementTargetBudgetSetComReqDto.getTargetCycleContentTypeCode(), "B3执行目标预算设置-D3-执行目标预算设置(公共)-关联目标内容类型编码不能为空", false);
        Assert.isNull(implementTargetBudgetSetComReqDto.getTargetCycleContentId(), "B3执行目标预算设置-D3-执行目标预算设置(公共)-关联目标内容ID不能为空", false);
        Assert.isNull(implementTargetBudgetSetComReqDto.getEvaluationTemplateId(), "B3执行目标预算设置-D3-执行目标预算设置(公共)-冗余评价模板ID不能为空", false);
        Assert.isNull(implementTargetBudgetSetComReqDto.getPeriodicModeTypeCode(), "B3执行目标预算设置-D3-执行目标预算设置(公共)-周期模式类型编码不能为空", false);
        Assert.isNull(implementTargetBudgetSetComReqDto.getAddOrSubOptType(), "B3执行目标预算设置-D3-执行目标预算设置(公共)-加减操作类型不能为空", false);
        implementTargetBudgetSetComRespDto = fwAppFinanceClient.implementTargetBudgetSetCom(implementTargetBudgetSetComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementTargetBudgetSetRespDto retData = new BffImplementTargetBudgetSetRespDto();


        return retData;
    }

    /**
     * B3查询目标内容父周期预算设置详情(管理)[8452]
     * gen by moon at 2/27/2024, 10:50:55 PM
     */
    @Trace(operationName = "B3查询目标内容父周期预算设置详情(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetParentCycleBudgetSetDetailRespDto queryTargetParentCycleBudgetSetDetail(BffQueryTargetParentCycleBudgetSetDetailReqDto reqDto) {


        QueryTargetParentCycleBudgetSetDetailRespDto queryTargetParentCycleBudgetSetDetailRespDto_1 = null;
//步骤0: D3查询目标内容父周期预算设置详情 - queryTargetParentCycleBudgetSetDetail
        QueryTargetParentCycleBudgetSetDetailRespDto queryTargetParentCycleBudgetSetDetailRespDto = null;
        QueryTargetParentCycleBudgetSetDetailReqDto queryTargetParentCycleBudgetSetDetailReqDto = new QueryTargetParentCycleBudgetSetDetailReqDto();
        if (reqDto != null) {
            queryTargetParentCycleBudgetSetDetailReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1528594_1
            queryTargetParentCycleBudgetSetDetailReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1528597_1
            queryTargetParentCycleBudgetSetDetailReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1528595_1
            queryTargetParentCycleBudgetSetDetailReqDto.setPeriodicModeTypeCode(reqDto.getPeriodicModeTypeCode());//SimpleFieldAssign//sourceId:1528596_1
        }

        /*D3查询目标内容父周期预算设置详情[8382]   */
        Assert.isNull(queryTargetParentCycleBudgetSetDetailReqDto.getTargetCycleContentId(), "B3查询目标内容父周期预算设置详情(管理)-D3查询目标内容父周期预算设置详情-关联目标内容ID不能为空", false);
        Assert.isNull(queryTargetParentCycleBudgetSetDetailReqDto.getTargetCycleContentTypeCode(), "B3查询目标内容父周期预算设置详情(管理)-D3查询目标内容父周期预算设置详情-关联目标内容类型编码不能为空", false);
        Assert.isNull(queryTargetParentCycleBudgetSetDetailReqDto.getEvaluationTemplateId(), "B3查询目标内容父周期预算设置详情(管理)-D3查询目标内容父周期预算设置详情-冗余评价模板ID不能为空", false);
        Assert.isNull(queryTargetParentCycleBudgetSetDetailReqDto.getPeriodicModeTypeCode(), "B3查询目标内容父周期预算设置详情(管理)-D3查询目标内容父周期预算设置详情-周期模式类型编码不能为空", false);
        queryTargetParentCycleBudgetSetDetailRespDto = fwAppFinanceClient.queryTargetParentCycleBudgetSetDetail(queryTargetParentCycleBudgetSetDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetParentCycleBudgetSetDetailRespDto_1 = queryTargetParentCycleBudgetSetDetailRespDto;

        BffQueryTargetParentCycleBudgetSetDetailRespDto retData = new BffQueryTargetParentCycleBudgetSetDetailRespDto();
        if (queryTargetParentCycleBudgetSetDetailRespDto_1 != null) {
            retData.setTargetCostSetId(queryTargetParentCycleBudgetSetDetailRespDto_1.getTargetCostSetId());//SimpleFieldAssign//sourceId:1528607_1
            retData.setEvaObjTargetCycleId(queryTargetParentCycleBudgetSetDetailRespDto_1.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1528608_1
            retData.setTargetCycleName(queryTargetParentCycleBudgetSetDetailRespDto_1.getTargetCycleName());//SimpleFieldAssign//sourceId:1560834_1
            retData.setCycleBudgetAmount(queryTargetParentCycleBudgetSetDetailRespDto_1.getCycleBudgetAmount());//SimpleFieldAssign//sourceId:1528610_1
            retData.setCycleBudgetUnit(queryTargetParentCycleBudgetSetDetailRespDto_1.getCycleBudgetUnit());//SimpleFieldAssign//sourceId:1528611_1
            retData.setIsOpenBudget(queryTargetParentCycleBudgetSetDetailRespDto_1.getIsOpenBudget());//SimpleFieldAssign//sourceId:1560697_1
            retData.setIsBudgetSeted(queryTargetParentCycleBudgetSetDetailRespDto_1.getIsBudgetSeted());//SimpleFieldAssign//sourceId:1560708_1
            retData.setSubjectLifeCycle(queryTargetParentCycleBudgetSetDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:1560796_1
        }


        return retData;
    }

    /**
     * B3查询目标子周期及来源预算设置列表(管理)[8458]
     * gen by moon at 2/5/2024, 4:20:57 PM
     */
    @Trace(operationName = "B3查询目标子周期及来源预算设置列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetCycleAndSourceBudgetSetListRespDto queryTargetCycleAndSourceBudgetSetList(BffQueryTargetCycleAndSourceBudgetSetListReqDto reqDto) {


        QueryTargetCycleAndSourceBudgetSetListRespDto queryTargetCycleAndSourceBudgetSetListRespDto_1 = null;
//步骤0: D3查询目标周期及来源预算设置列表 - queryTargetCycleAndSourceBudgetSetList
        QueryTargetCycleAndSourceBudgetSetListRespDto queryTargetCycleAndSourceBudgetSetListRespDto = null;
        QueryTargetCycleAndSourceBudgetSetListReqDto queryTargetCycleAndSourceBudgetSetListReqDto = new QueryTargetCycleAndSourceBudgetSetListReqDto();
        if (reqDto != null) {
            queryTargetCycleAndSourceBudgetSetListReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1530392_1
            queryTargetCycleAndSourceBudgetSetListReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1530393_1
        }

        /*D3查询目标周期及来源预算设置列表[8455]   */
        Assert.isNull(queryTargetCycleAndSourceBudgetSetListReqDto.getTargetCycleContentId(), "B3查询目标子周期及来源预算设置列表(管理)-D3查询目标周期及来源预算设置列表-关联目标内容ID不能为空", false);
        Assert.isNull(queryTargetCycleAndSourceBudgetSetListReqDto.getEvaluationTemplateId(), "B3查询目标子周期及来源预算设置列表(管理)-D3查询目标周期及来源预算设置列表-冗余评价模板ID不能为空", false);
        queryTargetCycleAndSourceBudgetSetListRespDto = fwAppFinanceClient.queryTargetCycleAndSourceBudgetSetList(queryTargetCycleAndSourceBudgetSetListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetCycleAndSourceBudgetSetListRespDto_1 = queryTargetCycleAndSourceBudgetSetListRespDto;

        BffQueryTargetCycleAndSourceBudgetSetListRespDto retData = new BffQueryTargetCycleAndSourceBudgetSetListRespDto();
        if (queryTargetCycleAndSourceBudgetSetListRespDto_1 != null) {
            retData.setTargetBudgetSetList(queryTargetCycleAndSourceBudgetSetListRespDto_1.getTargetBudgetSetList().stream().map(item -> BeanUtil.toBean(item, BffTargetBudgetSetDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1530398_1
        }


        return retData;
    }

    /**
     * B3查询目标周期预算设置资金来源列表(管理)[8466]
     * gen by moon at 2/5/2024, 9:34:53 PM
     */
    @Trace(operationName = "B3查询目标周期预算设置资金来源列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetCycleBudgetSetSourceListRespDto queryTargetCycleBudgetSetSourceList(BffQueryTargetCycleBudgetSetSourceListReqDto reqDto) {


        QueryTargetCycleBudgetSetSourceListComRespDto queryTargetCycleBudgetSetSourceListComRespDto_1 = null;
//步骤0: D7查询目标周期预算设置资金来源列表(公共) - queryTargetCycleBudgetSetSourceListCom
        QueryTargetCycleBudgetSetSourceListComRespDto queryTargetCycleBudgetSetSourceListComRespDto = null;
        QueryTargetCycleBudgetSetSourceListComReqDto queryTargetCycleBudgetSetSourceListComReqDto = new QueryTargetCycleBudgetSetSourceListComReqDto();
        if (reqDto != null) {
            queryTargetCycleBudgetSetSourceListComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1533841_1
//queryTargetCycleBudgetSetSourceListComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1533842_1
            queryTargetCycleBudgetSetSourceListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1533843_1
        }

        /*D7查询目标周期预算设置资金来源列表(公共)[8473]   */
        Assert.isNull(queryTargetCycleBudgetSetSourceListComReqDto.getEvaObjTargetCycleId(), "B3查询目标周期预算设置资金来源列表(管理)-D7查询目标周期预算设置资金来源列表(公共)-被评对象目标周期ID不能为空", false);
//Assert.isNull(queryTargetCycleBudgetSetSourceListComReqDto.getTargetCycleContentId(),"B3查询目标周期预算设置资金来源列表(管理)-D7查询目标周期预算设置资金来源列表(公共)-关联目标内容ID不能为空",false);
        Assert.isNull(queryTargetCycleBudgetSetSourceListComReqDto.getEvaluationTemplateId(), "B3查询目标周期预算设置资金来源列表(管理)-D7查询目标周期预算设置资金来源列表(公共)-评价模板ID不能为空", false);
        queryTargetCycleBudgetSetSourceListComRespDto = fwFinanceFinanceClient.queryTargetCycleBudgetSetSourceListCom(queryTargetCycleBudgetSetSourceListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetCycleBudgetSetSourceListComRespDto_1 = queryTargetCycleBudgetSetSourceListComRespDto;

        BffQueryTargetCycleBudgetSetSourceListRespDto retData = new BffQueryTargetCycleBudgetSetSourceListRespDto();
        if (queryTargetCycleBudgetSetSourceListComRespDto_1 != null) {
//      retData.setTargetBudgetSetList(queryTargetCycleBudgetSetSourceListComRespDto_1.getTargetBudgetSetList().stream().map(item -> BeanUtil.toBean(item, BffTargetBudgetSetDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1533850_1
        }


        return retData;
    }

    /**
     * B3获取目标内容加OR减预算资金来源(管理)[8471]
     * gen by moon at 2/18/2024, 5:55:49 PM
     */
    @Trace(operationName = "B3获取目标内容加OR减预算资金来源(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffObtainTargetContentAddOrSubBudgetSourceRespDto obtainTargetContentAddOrSubBudgetSource(BffObtainTargetContentAddOrSubBudgetSourceReqDto reqDto) {


        QueryOutputParametersDetailComRespDto queryOutputParametersDetailComRespDto_1 = null;
        if ((reqDto != null && reqDto.getAddOrSubOptType() != null && reqDto.getAddOrSubOptType().equals("ADD"))) {
            //if(B3获取目标内容加OR减预算资金来源(管理).加减操作类型 等于 加)  60922

            QueryEvaTempDetailRespDto queryEvaTempDetailRespDto = null;
            QueryEvaTempDetailReqDto queryEvaTempDetailReqDto = new QueryEvaTempDetailReqDto();
            queryEvaTempDetailReqDto.setIsArchive("FALSE");//sourceId:1551832_1_61441
            if (reqDto != null) {
                queryEvaTempDetailReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1551831_1_61441
            }

            /*D3-2查评价模板详情[3062]   */
            Assert.isNull(queryEvaTempDetailReqDto.getEvaluationTemplateId(), "B3获取目标内容加OR减预算资金来源(管理)-D3-2查评价模板详情-评价模板ID不能为空", false);
            Assert.isNull(queryEvaTempDetailReqDto.getIsArchive(), "B3获取目标内容加OR减预算资金来源(管理)-D3-2查评价模板详情-是否存档不能为空", false);
            queryEvaTempDetailRespDto = fwAppEvaThemeClient.queryEvaTempDetail(queryEvaTempDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            QueryAccountCapitalSourceListComRespDto queryAccountCapitalSourceListComRespDto = null;
            if (queryEvaTempDetailRespDto != null) {
                QueryAccountCapitalSourceListComReqDto queryAccountCapitalSourceListComReqDto = new QueryAccountCapitalSourceListComReqDto();
                queryAccountCapitalSourceListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1533178_1_60925
                if (queryEvaTempDetailRespDto != null) {
                    queryAccountCapitalSourceListComReqDto.setUseSceneTypeCode(queryEvaTempDetailRespDto.getEvaluationSubjectTypeCode());//SimpleFieldAssign//sourceId:1533175_1_60925
                }

                /*D7查询财务资金来源列表(公共)[8045]   */
                Assert.isNull(queryAccountCapitalSourceListComReqDto.getSubjectLifeCycle(), "B3获取目标内容加OR减预算资金来源(管理)-D7查询财务资金来源列表(公共)-主体生命周期不能为空", false);
                queryAccountCapitalSourceListComRespDto = fwFinanceFinanceClient.queryAccountCapitalSourceListCom(queryAccountCapitalSourceListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            }
            QueryOutputParametersDetailComRespDto queryOutputParametersDetailComRespDto = null;
            if (queryAccountCapitalSourceListComRespDto != null) {
                QueryOutputParametersDetailComReqDto queryOutputParametersDetailComReqDto = new QueryOutputParametersDetailComReqDto();
                if (queryAccountCapitalSourceListComRespDto != null && queryAccountCapitalSourceListComRespDto.getAccountCapitalSourceList() != null && !CollectionUtil.isEmpty(queryAccountCapitalSourceListComRespDto.getAccountCapitalSourceList())) {
                    queryOutputParametersDetailComReqDto.setAccountCapitalSourceList(queryAccountCapitalSourceListComRespDto.getAccountCapitalSourceList().stream().map(item -> BeanUtil.toBean(item, AccountCapitalSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1533198_1_60927
                }

                /*D2接收资金来源数据集[4196]   */

                queryOutputParametersDetailComRespDto = fwCompDivineDataClient.queryOutputParametersDetailCom(queryOutputParametersDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


                queryOutputParametersDetailComRespDto_1 = queryOutputParametersDetailComRespDto;
            }
        } else if ((reqDto != null && reqDto.getAddOrSubOptType() != null && reqDto.getAddOrSubOptType().equals("SUB"))) {
            //elseif(B3获取目标内容加OR减预算资金来源(管理).加减操作类型 等于 减)  60923

            QuerySubBudgetSourceListComRespDto querySubBudgetSourceListComRespDto = null;
            QuerySubBudgetSourceListComReqDto querySubBudgetSourceListComReqDto = new QuerySubBudgetSourceListComReqDto();
            if (reqDto != null) {
                querySubBudgetSourceListComReqDto.setAddOrSubOptType(reqDto.getAddOrSubOptType());//SimpleFieldAssign//sourceId:1533587_1_60939
                querySubBudgetSourceListComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1533304_1_60939
                querySubBudgetSourceListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1533305_1_60939
            }

            /*D7查询减预算资金来源列表(公共)[8461]   */
            Assert.isNull(querySubBudgetSourceListComReqDto.getAddOrSubOptType(), "B3获取目标内容加OR减预算资金来源(管理)-D7查询减预算资金来源列表(公共)-加减操作类型不能为空", false);
            Assert.isNull(querySubBudgetSourceListComReqDto.getTargetCycleContentId(), "B3获取目标内容加OR减预算资金来源(管理)-D7查询减预算资金来源列表(公共)-关联目标内容ID不能为空", false);
            Assert.isNull(querySubBudgetSourceListComReqDto.getEvaluationTemplateId(), "B3获取目标内容加OR减预算资金来源(管理)-D7查询减预算资金来源列表(公共)-评价模板ID不能为空", false);
            querySubBudgetSourceListComRespDto = fwFinanceFinanceClient.querySubBudgetSourceListCom(querySubBudgetSourceListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            QueryOutputParametersDetailComRespDto queryOutputParametersDetailComRespDto_2 = null;
            if (querySubBudgetSourceListComRespDto != null) {
                QueryOutputParametersDetailComReqDto queryOutputParametersDetailComReqDto_1 = new QueryOutputParametersDetailComReqDto();
                if (querySubBudgetSourceListComRespDto != null && querySubBudgetSourceListComRespDto.getAccountCapitalSourceList() != null && !CollectionUtil.isEmpty(querySubBudgetSourceListComRespDto.getAccountCapitalSourceList())) {
                    queryOutputParametersDetailComReqDto_1.setAccountCapitalSourceList(querySubBudgetSourceListComRespDto.getAccountCapitalSourceList().stream().map(item -> BeanUtil.toBean(item, AccountCapitalSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1533198_1_60928
                }

                /*D2接收资金来源数据集[4196]   */

                queryOutputParametersDetailComRespDto_2 = fwCompDivineDataClient.queryOutputParametersDetailCom(queryOutputParametersDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


                queryOutputParametersDetailComRespDto_1 = queryOutputParametersDetailComRespDto_2;
            }
        }
        BffObtainTargetContentAddOrSubBudgetSourceRespDto retData = new BffObtainTargetContentAddOrSubBudgetSourceRespDto();
        if (queryOutputParametersDetailComRespDto_1 != null) {
            retData.setAccountCapitalSourceList(queryOutputParametersDetailComRespDto_1.getAccountCapitalSourceList().stream().map(item -> BeanUtil.toBean(item, BffAccountCapitalSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1533200_1
        }


        return retData;
    }

    /**
     * B3执行开启或关闭目标预算(管理)[7983]
     * gen by moon at 2/27/2024, 10:50:52 PM
     */
    @Trace(operationName = "B3执行开启或关闭目标预算(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementOpenOrCloseTargetBudgetRespDto implementOpenOrCloseTargetBudget(BffImplementOpenOrCloseTargetBudgetReqDto reqDto) {


        //步骤0: D3执行开启或关闭目标预算 - implementOpenOrCloseTargetBudget
        ImplementOpenOrCloseTargetBudgetRespDto implementOpenOrCloseTargetBudgetRespDto = null;
        ImplementOpenOrCloseTargetBudgetReqDto implementOpenOrCloseTargetBudgetReqDto = new ImplementOpenOrCloseTargetBudgetReqDto();
        if (reqDto != null) {
            implementOpenOrCloseTargetBudgetReqDto.setTableTypeCode(reqDto.getTableTypeCode());//SimpleFieldAssign//sourceId:1556544_1
            implementOpenOrCloseTargetBudgetReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:1556545_1
            implementOpenOrCloseTargetBudgetReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1556543_1
            implementOpenOrCloseTargetBudgetReqDto.setIsUseBudget(reqDto.getIsUseBudget());//SimpleFieldAssign//sourceId:1556546_1
            implementOpenOrCloseTargetBudgetReqDto.setPeriodicModeTypeCode(reqDto.getPeriodicModeTypeCode());//SimpleFieldAssign//sourceId:1560825_1
        }

        /*D3执行开启或关闭目标预算[8519]   */
        Assert.isNull(implementOpenOrCloseTargetBudgetReqDto.getTableTypeCode(), "B3执行开启或关闭目标预算(管理)-D3执行开启或关闭目标预算-内容表类型编码不能为空", false);
        Assert.isNull(implementOpenOrCloseTargetBudgetReqDto.getEntityId(), "B3执行开启或关闭目标预算(管理)-D3执行开启或关闭目标预算-内容表主键ID不能为空", false);
        Assert.isNull(implementOpenOrCloseTargetBudgetReqDto.getEvaluationTemplateId(), "B3执行开启或关闭目标预算(管理)-D3执行开启或关闭目标预算-冗余评价模板ID不能为空", false);
        Assert.isNull(implementOpenOrCloseTargetBudgetReqDto.getIsUseBudget(), "B3执行开启或关闭目标预算(管理)-D3执行开启或关闭目标预算-是否开启预算不能为空", false);
        Assert.isNull(implementOpenOrCloseTargetBudgetReqDto.getPeriodicModeTypeCode(), "B3执行开启或关闭目标预算(管理)-D3执行开启或关闭目标预算-周期模式类型编码不能为空", false);
        implementOpenOrCloseTargetBudgetRespDto = fwAppFinanceClient.implementOpenOrCloseTargetBudget(implementOpenOrCloseTargetBudgetReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementOpenOrCloseTargetBudgetRespDto retData = new BffImplementOpenOrCloseTargetBudgetRespDto();


        return retData;
    }

    /**
     * B3查询目标内容预算子周期列表[8526]
     * gen by moon at 2/25/2024, 12:12:13 AM
     */
    @Trace(operationName = "B3查询目标内容预算子周期列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetContentBudgetSubCycleListRespDto queryTargetContentBudgetSubCycleList(BffQueryTargetContentBudgetSubCycleListReqDto reqDto) {


        QueryTargetContentBudgetSubCycleListComRespDto queryTargetContentBudgetSubCycleListComRespDto_1 = null;
//步骤0: D3查询目标内容预算子周期列表(公共) - queryTargetContentBudgetSubCycleListCom
        QueryTargetContentBudgetSubCycleListComRespDto queryTargetContentBudgetSubCycleListComRespDto = null;
        QueryTargetContentBudgetSubCycleListComReqDto queryTargetContentBudgetSubCycleListComReqDto = new QueryTargetContentBudgetSubCycleListComReqDto();
        if (reqDto != null) {
            queryTargetContentBudgetSubCycleListComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1558584_1
            queryTargetContentBudgetSubCycleListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1558585_1
        }

        /*D3查询目标内容预算子周期列表(公共)[8525]   */
        Assert.isNull(queryTargetContentBudgetSubCycleListComReqDto.getTargetCycleContentId(), "B3查询目标内容预算子周期列表-D3查询目标内容预算子周期列表(公共)-关联目标内容ID不能为空", false);
        Assert.isNull(queryTargetContentBudgetSubCycleListComReqDto.getEvaluationTemplateId(), "B3查询目标内容预算子周期列表-D3查询目标内容预算子周期列表(公共)-冗余评价模板ID不能为空", false);
        queryTargetContentBudgetSubCycleListComRespDto = fwAppFinanceClient.queryTargetContentBudgetSubCycleListCom(queryTargetContentBudgetSubCycleListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetContentBudgetSubCycleListComRespDto_1 = queryTargetContentBudgetSubCycleListComRespDto;

        BffQueryTargetContentBudgetSubCycleListRespDto retData = new BffQueryTargetContentBudgetSubCycleListRespDto();
        if (queryTargetContentBudgetSubCycleListComRespDto_1 != null) {
            retData.setSubCycleList(queryTargetContentBudgetSubCycleListComRespDto_1.getSubCycleList().stream().map(item -> BeanUtil.toBean(item, BffSubCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1558589_1
        }


        return retData;
    }

    /**
     * B3查询目标内容预算设置状态(管理)[2858]
     * gen by moon at 2/25/2024, 11:36:30 AM
     */
    @Trace(operationName = "B3查询目标内容预算设置状态(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetContentBudgetStateDetailRespDto queryTargetContentBudgetStateDetail(BffQueryTargetContentBudgetStateDetailReqDto reqDto) {


        QueryTargetContentBudgetStateDetailRespDto queryTargetContentBudgetStateDetailRespDto_1 = null;
//步骤0: D3查询目标内容预算设置状态详情 - queryTargetContentBudgetStateDetail
        QueryTargetContentBudgetStateDetailRespDto queryTargetContentBudgetStateDetailRespDto = null;
        QueryTargetContentBudgetStateDetailReqDto queryTargetContentBudgetStateDetailReqDto = new QueryTargetContentBudgetStateDetailReqDto();
        if (reqDto != null) {
            queryTargetContentBudgetStateDetailReqDto.setTableTypeCode(reqDto.getTableTypeCode());//SimpleFieldAssign//sourceId:1558793_1
            queryTargetContentBudgetStateDetailReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:1558794_1
            queryTargetContentBudgetStateDetailReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1558795_1
        }

        /*D3查询目标内容预算设置状态详情[2859]   */
        Assert.isNull(queryTargetContentBudgetStateDetailReqDto.getTableTypeCode(), "B3查询目标内容预算设置状态(管理)-D3查询目标内容预算设置状态详情-内容表类型编码不能为空", false);
        Assert.isNull(queryTargetContentBudgetStateDetailReqDto.getEntityId(), "B3查询目标内容预算设置状态(管理)-D3查询目标内容预算设置状态详情-内容表主键ID不能为空", false);
        Assert.isNull(queryTargetContentBudgetStateDetailReqDto.getEvaluationTemplateId(), "B3查询目标内容预算设置状态(管理)-D3查询目标内容预算设置状态详情-冗余评价模板ID不能为空", false);
        queryTargetContentBudgetStateDetailRespDto = fwAppFinanceClient.queryTargetContentBudgetStateDetail(queryTargetContentBudgetStateDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetContentBudgetStateDetailRespDto_1 = queryTargetContentBudgetStateDetailRespDto;

        BffQueryTargetContentBudgetStateDetailRespDto retData = new BffQueryTargetContentBudgetStateDetailRespDto();
        if (queryTargetContentBudgetStateDetailRespDto_1 != null) {
            retData.setIsOpenBudget(queryTargetContentBudgetStateDetailRespDto_1.getIsOpenBudget());//SimpleFieldAssign//sourceId:1558799_1
        }


        return retData;
    }

    /**
     * B7执行清空资金来源预算设置(管理)[8533]
     * gen by moon at 2/28/2024, 7:14:18 PM
     */
    @Trace(operationName = "B7执行清空资金来源预算设置(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementClearBudgetSourceSetRespDto implementClearBudgetSourceSet(BffImplementClearBudgetSourceSetReqDto reqDto) {


        //步骤0: D7执行清空资金来源预算设置(公共) - implementClearBudgetSourceSetCom
        ImplementClearBudgetSourceSetComRespDto implementClearBudgetSourceSetComRespDto = null;
        ImplementClearBudgetSourceSetComReqDto implementClearBudgetSourceSetComReqDto = new ImplementClearBudgetSourceSetComReqDto();
        implementClearBudgetSourceSetComReqDto.setBudgetCycleModeTypeCode("CAPITAL_SOURCE");//sourceId:1560886_1
        implementClearBudgetSourceSetComReqDto.setIsBudgetSeted("FALSE");//sourceId:1561400_1
        implementClearBudgetSourceSetComReqDto.setIsArchive("FALSE");//sourceId:1560888_1
        if (reqDto != null) {
            implementClearBudgetSourceSetComReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1560887_1
            implementClearBudgetSourceSetComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1560889_1
        }

        /*D7执行清空资金来源预算设置(公共)[8532]   */
        Assert.isNull(implementClearBudgetSourceSetComReqDto.getBudgetCycleModeTypeCode(), "B7执行清空资金来源预算设置(管理)-D7执行清空资金来源预算设置(公共)-预算周期模型编码不能为空", false);
        Assert.isNull(implementClearBudgetSourceSetComReqDto.getTargetCycleContentId(), "B7执行清空资金来源预算设置(管理)-D7执行清空资金来源预算设置(公共)-关联目标内容ID不能为空", false);
        Assert.isNull(implementClearBudgetSourceSetComReqDto.getIsBudgetSeted(), "B7执行清空资金来源预算设置(管理)-D7执行清空资金来源预算设置(公共)-预算是否已设置不能为空", false);
        Assert.isNull(implementClearBudgetSourceSetComReqDto.getIsArchive(), "B7执行清空资金来源预算设置(管理)-D7执行清空资金来源预算设置(公共)-是否存档不能为空", false);
        Assert.isNull(implementClearBudgetSourceSetComReqDto.getEvaluationTemplateId(), "B7执行清空资金来源预算设置(管理)-D7执行清空资金来源预算设置(公共)-冗余评价模板ID不能为空", false);
        implementClearBudgetSourceSetComRespDto = fwFinanceFinanceClient.implementClearBudgetSourceSetCom(implementClearBudgetSourceSetComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementClearBudgetSourceSetRespDto retData = new BffImplementClearBudgetSourceSetRespDto();


        return retData;
    }

    /**
     * B3执行目标周期预算设置资金来源(管理)[8486]
     * gen by moon at 2/28/2024, 12:39:48 PM
     */
    @Trace(operationName = "B3执行目标周期预算设置资金来源(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementTargetCycleBudgetSetSourceRespDto implementTargetCycleBudgetSetSource(BffImplementTargetCycleBudgetSetSourceReqDto reqDto) {


//步骤0: D7执行初始化来源预算设置 - implementInitializeSourceBudgetSet
        ImplementInitializeSourceBudgetSetRespDto implementInitializeSourceBudgetSetRespDto = null;
        ImplementInitializeSourceBudgetSetReqDto implementInitializeSourceBudgetSetReqDto = new ImplementInitializeSourceBudgetSetReqDto();
        if (reqDto != null) {
            implementInitializeSourceBudgetSetReqDto.setAccountCapitalSourceList(reqDto.getAccountCapitalSourceList());//list-field-assign//sourceId:1537897_1
            implementInitializeSourceBudgetSetReqDto.setEvaObjTargetCycleList(reqDto.getEvaObjTargetCycleList());//list-field-assign//sourceId:1537898_1
            implementInitializeSourceBudgetSetReqDto.setTargetCycleContentTypeCode(reqDto.getTargetCycleContentTypeCode());//SimpleFieldAssign//sourceId:1537899_1
            implementInitializeSourceBudgetSetReqDto.setTargetCycleContentId(reqDto.getTargetCycleContentId());//SimpleFieldAssign//sourceId:1537900_1
            implementInitializeSourceBudgetSetReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1537901_1
            implementInitializeSourceBudgetSetReqDto.setCycleBudgetUnit(reqDto.getCycleBudgetUnit());//SimpleFieldAssign//sourceId:1537902_1
        }

        /*D7执行初始化来源预算设置[8480]   */
        Assert.isNull(implementInitializeSourceBudgetSetReqDto.getTargetCycleContentTypeCode(), "B3执行目标周期预算设置资金来源(管理)-D7执行初始化来源预算设置-关联目标内容类型编码不能为空", false);
        Assert.isNull(implementInitializeSourceBudgetSetReqDto.getTargetCycleContentId(), "B3执行目标周期预算设置资金来源(管理)-D7执行初始化来源预算设置-关联目标内容ID不能为空", false);
        Assert.isNull(implementInitializeSourceBudgetSetReqDto.getEvaluationTemplateId(), "B3执行目标周期预算设置资金来源(管理)-D7执行初始化来源预算设置-冗余评价模板ID不能为空", false);
        Assert.isNull(implementInitializeSourceBudgetSetReqDto.getCycleBudgetUnit(), "B3执行目标周期预算设置资金来源(管理)-D7执行初始化来源预算设置-冗余预算单位不能为空", false);
        implementInitializeSourceBudgetSetRespDto = fwFinanceFinanceClient.implementInitializeSourceBudgetSet(implementInitializeSourceBudgetSetReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementTargetCycleBudgetSetSourceRespDto retData = new BffImplementTargetCycleBudgetSetSourceRespDto();


        return retData;
    }

    /**
     * B3查询目标内容资金来源预算设置列表(管理)[8534]
     * gen by moon at 2/28/2024, 12:39:54 PM
     */
    @Trace(operationName = "B3查询目标内容资金来源预算设置列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryTargetConBudgetSourceSetListRespDto queryTargetConBudgetSourceSetList(BffQueryTargetConBudgetSourceSetListReqDto reqDto) {


        QueryTargetCycleBudgetSetSourceListComRespDto queryTargetCycleBudgetSetSourceListComRespDto_1 = null;
//步骤0: D7查询目标周期预算设置资金来源列表(公共) - queryTargetCycleBudgetSetSourceListCom
        QueryTargetCycleBudgetSetSourceListComRespDto queryTargetCycleBudgetSetSourceListComRespDto = null;
        QueryTargetCycleBudgetSetSourceListComReqDto queryTargetCycleBudgetSetSourceListComReqDto = new QueryTargetCycleBudgetSetSourceListComReqDto();
        if (reqDto != null) {
            queryTargetCycleBudgetSetSourceListComReqDto.setTargetBudgetSourceList(reqDto.getTargetBudgetSourceList());//list-field-assign//sourceId:1560911_1
            queryTargetCycleBudgetSetSourceListComReqDto.setEvaObjTargetCycleId(reqDto.getEvaObjTargetCycleId());//SimpleFieldAssign//sourceId:1560909_1
            queryTargetCycleBudgetSetSourceListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:1560908_1
        }

        /*D7查询目标周期预算设置资金来源列表(公共)[8473]   */
        Assert.isNull(queryTargetCycleBudgetSetSourceListComReqDto.getEvaObjTargetCycleId(), "B3查询目标内容资金来源预算设置列表(管理)-D7查询目标周期预算设置资金来源列表(公共)-被评对象目标周期ID不能为空", false);
        Assert.isNull(queryTargetCycleBudgetSetSourceListComReqDto.getEvaluationTemplateId(), "B3查询目标内容资金来源预算设置列表(管理)-D7查询目标周期预算设置资金来源列表(公共)-评价模板ID不能为空", false);
        queryTargetCycleBudgetSetSourceListComRespDto = fwFinanceFinanceClient.queryTargetCycleBudgetSetSourceListCom(queryTargetCycleBudgetSetSourceListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryTargetCycleBudgetSetSourceListComRespDto_1 = queryTargetCycleBudgetSetSourceListComRespDto;

        BffQueryTargetConBudgetSourceSetListRespDto retData = new BffQueryTargetConBudgetSourceSetListRespDto();
        if (queryTargetCycleBudgetSetSourceListComRespDto_1 != null) {
            retData.setTargetBudgetSourceList(queryTargetCycleBudgetSetSourceListComRespDto_1.getTargetBudgetSourceList().stream().map(item -> BeanUtil.toBean(item, BffTargetBudgetSourceDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1560915_1
        }


        return retData;
    }
    //
}
